package com.luckcoder.relax.games.domain.bo;

import com.luckcoder.relax.games.domain.RelaxGameLeaderboard;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

import java.util.Date;

/**
 * 游戏排行榜业务对象 relax_game_leaderboard
 *
 * @author zhanghao
 * @date 2025-09-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = RelaxGameLeaderboard.class, reverseConvertGenerate = false)
public class RelaxGameLeaderboardBo extends BaseEntity {
    
    /**
     * 排行ID
     */
    @NotNull(message = "排行ID不能为空", groups = {EditGroup.class})
    private Long rankId;
    
    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;
    
    /**
     * 游戏ID
     */
    @NotNull(message = "游戏ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long gameId;
    
    /**
     * 游戏编码
     */
    @NotBlank(message = "游戏编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String gameCode;
    
    /**
     * 最高分数
     */
    private Long bestScore;
    
    /**
     * 累计分数
     */
    private Long totalScore;
    
    /**
     * 游戏次数
     */
    private Long playCount;
    
    /**
     * 累计时长（秒）
     */
    private Long totalTime;
    
    /**
     * 平均分数
     */
    private Long avgScore;
    
    /**
     * 排行类型（daily日榜、weekly周榜、monthly月榜、all总榜）
     */
    private String rankType;
    
    /**
     * 排行周期（格式：2024-01、2024-W01、2024-01-01）
     */
    @NotBlank(message = "排行周期（格式：2024-01、2024-W01、2024-01-01）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String rankPeriod;
    
    /**
     * 最后游戏时间
     */
    private Date lastPlayTime;
    
    
}
